
import request from '@/utils/request'

//查看该机构下的部门集合列表--树形结构
export function treeDeptList(){
  return request({
    url:'/enterprise/dept/dept/tree/list',
    method:'get'
  })
}

// 部门集合列表-树形结构-无上级
export function treeDeptSelect(){
  return request({
    url:'/enterprise/dept/dept/tree/addList',
    method:'get'
  })
}

// 添加部门
export function addDept(data){
  return request({
    url:'/enterprise/dept/dept',
    method:'post',
    data:data
  })
}

// 修改部门
export function updateDept(data) {
  return request({
    url: '/enterprise/dept/dept',
    method: 'put',
    data: data
  })
}

// 删除部门
export function delDept(deptId) {
  return request({
    url: '/enterprise/dept/dept/' + deptId,
    method: 'delete'
  })
}

// 查询部门详细信息
export function getDept(deptId) {
  return request({
    url: '/enterprise/dept/dept/' + deptId,
    method: 'get'
  })
}

// 查看小区列表集合
export function estateList() {
  return request({
    url: '/enterprise/house/estate/estateList',
    method: 'get'
  })
}

//部门列表查询
export function listDept(){
  return request({
    url:'/enterprise/dept/dept/list',
    method:'get'
  })
}
